import Layout from '@/layout'
import RouteButtonsBuilder from '@/framework/infra/router/RouterButtonsBuilder'
import TableButtonType from '@/framework/constant/TableButtonType'

export default [
  {
    path: '/ag',
    component: Layout,
    meta: {title: '港人指引', icon: 'el-icon-s-help'},
    children: [
      {
        path: 'tag',
        component: () => import('@/feature/ag/app/tag/index.vue'),
        meta: {title: '标签管理', icon: 'table'},
        buttons: RouteButtonsBuilder.builder('ag:tag').oo()

          .addButtons([
            {
              handler: 'list',
              name: 'list',
              type: TableButtonType.SEARCHBAR,
              label: '搜索',
              icon: 'el-icon-search'
            },
            {
              handler: 'export',
              name: 'export',
              type: TableButtonType.TOOLBAR_RIGHT,
              label: '导出',
              buttonType: 'primary',
              icon: 'el-icon-download'
            },
            {
              handler: 'create',
              name: 'create',
              type: TableButtonType.TOOLBAR,
              label: '新建指引标签',
              icon: 'el-icon-plus'
            },
            {
              handler: 'update',
              name: 'update',
              type: TableButtonType.ROW,
              label: '修改',
              icon: 'el-icon-edit'
            },
            {
              handler: 'remove',
              name: 'remove',
              type: TableButtonType.ROW,
              label: '删除',
              buttonType: 'danger',
              icon: 'el-icon-delete'
            }

          ])
          .build()
      },
      {
        path: 'onekey-group',
        component: () => import('@/feature/ag/app/onekey-group/index.vue'),
        meta: {title: '一键联系组', icon: 'table'},
        buttons: RouteButtonsBuilder.builder('ag:onekeyGroup')

          .addButtons([
            {
              handler: 'list',
              name: 'list',
              type: TableButtonType.SEARCHBAR,
              label: '搜索',
              icon: 'el-icon-search'
            },
            {
              handler: 'export',
              name: 'export',
              type: TableButtonType.TOOLBAR_RIGHT,
              label: '导出',
              buttonType: 'primary',
              icon: 'el-icon-download'
            },
            {
              handler: 'create',
              name: 'create',
              type: TableButtonType.TOOLBAR,
              label: '新建组名',
              icon: 'el-icon-plus'
            },
            {
              handler: 'update',
              name: 'update',
              type: TableButtonType.ROW,
              label: '修改',
              icon: 'el-icon-edit'
            },
            {
              handler: 'remove',
              name: 'remove',
              type: TableButtonType.ROW,
              label: '删除',
              buttonType: 'danger',
              icon: 'el-icon-delete'
            }

          ])
          .build()
      },
      {
        path: 'onekey',
        component: () => import('@/feature/ag/app/onekey/index.vue'),
        meta: {title: '一键联系', icon: 'table'},
        buttons: RouteButtonsBuilder.builder('ag:onekey')

          .addButtons([
            {
              handler: 'list',
              name: 'list',
              type: TableButtonType.SEARCHBAR,
              label: '搜索',
              icon: 'el-icon-search'
            },
            {
              handler: 'export',
              name: 'export',
              type: TableButtonType.TOOLBAR_RIGHT,
              label: '导出',
              buttonType: 'primary',
              icon: 'el-icon-download'
            },
            {
              handler: 'create',
              name: 'create',
              type: TableButtonType.TOOLBAR,
              label: '新建联系人',
              icon: 'el-icon-plus'
            },
            {
              handler: 'update',
              name: 'update',
              type: TableButtonType.ROW,
              label: '修改',
              icon: 'el-icon-edit'
            },
            {
              handler: 'remove',
              name: 'remove',
              type: TableButtonType.ROW,
              label: '删除',
              buttonType: 'danger',
              icon: 'el-icon-delete'
            }

          ])
          .build()
      },
      {
        path: 'tag-line',
        component: () => import('@/feature/ag/app/tag-line/index.vue'),
        meta: {title: '地铁线路与一册通', icon: 'table'},
        buttons: RouteButtonsBuilder.builder('ag:tag-line')

          .addButtons([
            {
              handler: 'list',
              name: 'list',
              type: TableButtonType.SEARCHBAR,
              label: '搜索',
              icon: 'el-icon-search'
            },
            {
              handler: 'create',
              name: 'create',
              type: TableButtonType.TOOLBAR,
              label: '新建线路',
              icon: 'el-icon-plus'
            },
            {
              handler: 'update',
              name: 'update',
              type: TableButtonType.ROW,
              label: '修改',
              icon: 'el-icon-edit'
            },
            {
              handler: 'remove',
              name: 'remove',
              type: TableButtonType.ROW,
              label: '删除',
              buttonType: 'danger',
              icon: 'el-icon-delete'
            }

          ])
          .build()
      },
      {
        path: 'tag-know',
        component: () => import('@/feature/ag/app/tag-know/index.vue'),
        meta: {title: '福田我知道', icon: 'table'},
        buttons: RouteButtonsBuilder.builder('ag:tag').oo()

          .addButtons([
            {
              handler: 'list',
              name: 'list',
              type: TableButtonType.SEARCHBAR,
              label: '搜索',
              icon: 'el-icon-search'
            },
            {
              handler: 'export',
              name: 'export',
              type: TableButtonType.TOOLBAR_RIGHT,
              label: '导出',
              buttonType: 'primary',
              icon: 'el-icon-download'
            },
            {
              handler: 'create',
              name: 'create',
              type: TableButtonType.TOOLBAR,
              label: '新建问答',
              icon: 'el-icon-plus'
            },
            {
              handler: 'update',
              name: 'update',
              type: TableButtonType.ROW,
              label: '修改',
              icon: 'el-icon-edit'
            },
            {
              handler: 'remove',
              name: 'remove',
              type: TableButtonType.ROW,
              label: '删除',
              buttonType: 'danger',
              icon: 'el-icon-delete'
            }

          ])
          .build()
      },
      {
        path: 'alley-guide',
        component: () => import('@/feature/ag/app/alley-guide/index.vue'),
        meta: {title: '内容管理', icon: 'table'},
        buttons: RouteButtonsBuilder.builder('ag:tag').oo()

          .addButtons([
            {
              handler: 'list',
              name: 'list',
              type: TableButtonType.SEARCHBAR,
              label: '搜索',
              icon: 'el-icon-search'
            },
            {
              handler: 'export',
              name: 'export',
              type: TableButtonType.TOOLBAR_RIGHT,
              label: '导出',
              buttonType: 'primary',
              icon: 'el-icon-download'
            },
            {
              handler: 'create',
              name: 'create',
              type: TableButtonType.TOOLBAR,
              label: '新建文章',
              icon: 'el-icon-plus'
            },
            {
              handler: 'update',
              name: 'update',
              type: TableButtonType.ROW,
              label: '修改',
              icon: 'el-icon-edit'
            },
            {
              handler: 'remove',
              name: 'remove',
              type: TableButtonType.ROW,
              label: '删除',
              buttonType: 'danger',
              icon: 'el-icon-delete'
            }

          ])
          .build()
      },
      // #appendSpot# 生成工具用，不要删了
    ]
  }
]
